home *** CD-ROM | disk | FTP | other *** search
- Path: info.spt.net.cn!usenet
- From: Xu Yifeng <jafd@public.sta.net.cn>
- Newsgroups: comp.lang.c++
- Subject: Re: Sun compiler bug?
- Date: Wed, 31 Jan 1996 07:01:36 -0800
- Organization: Shanghai Post & Telecommunication
- Message-ID: <310F8450.4C37@public.sta.net.cn>
- References: <4ejgfl$938@sun132.spd.dsccc.com>
- NNTP-Posting-Host: ts1-7.sta.net.cn
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6b (Win16; I)
-
- Kevin Cline wrote:
- |>
- |> The Sun version 4 compiler won't compile this:
- |>
- |> class X {
- |> typedef int T;
- |> };
- |>
- |> enum E { T = 0 };
- |>
- |> It complains:
- |> "foo.C", line 5: Error: Multiple declaration for T.
- |>
- |> Is this a bug, or is am I misunderstanding the scoping rules?
- |>
- |> Thanks.
- |> --
- |> Kevin Cline
-
- It is a big bug according new C++ standard, new C++ standard supports
- type nest, this error will apear in old version C++.
-
- Best Wishs,
- Xu Yifeng
-